import axios from '~/axios'

// 添加指标
export function addLindiIndexApi(data) {
    return axios.post('/basic/lindi/index/addIndex', data)
}

// 删除指标
export function deleteLindiIndexByLindiIndexIdApi(indexId) {
    return axios({
        method: 'DELETE',
        url: '/basic/lindi/index/deleteIndexByIndexId',
        params: {
            indexId: indexId
        }
    })
}

// 修改指标
export function updateLindiIndexByLindiIndexIdApi(data) {
    return axios.put('/basic/lindi/index/updateIndexByIndexId', data)
}

// 分页查询指标列表
export function getPageLindiIndexListApi(params) {
    return axios({
        method: 'GET',
        url: '/basic/lindi/index/getPageIndexList',
        params: params
    })
}

// 根据ID查询指标详情
export function getLindiIndexByLindiIndexIdApi(indexId) {
    return axios.get(`/basic/lindi/index/getIndexByIndexId/${indexId}`)
}

// 获取指标统计数据
export function getLindiIndexStatisticsApi() {
    return axios.get('/basic/lindi/index/getStatistics')
}

// 获取可交易的镇街名称列表
export function getEnableTradeTownNameListApi() {
    return axios.get('/basic/lindi/index/getEnableTradeTownNameList')
}